#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.57)
AC_INIT(webbot, p1.0, puninj@cs.rpi.edu)
AC_CONFIG_SRCDIR([src/HTQueue.c])
AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE

AC_ARG_WITH(www_lib,
	[ --with-www_lib=<path> prefix of WWW_LIB installation directory. e.g. /usr/local or /usr],
	[WWW_LIB_DIR=$with_www_lib],
	[WWW_LIB_DIR="/usr/local/include/w3c-libwww"]
)
AC_SUBST(WWW_LIB_DIR)

# Checks for programs.
AC_PROG_CC

# Checks for libraries.
AC_CHECK_LIB([m], [main])
AC_CHECK_LIB([md5], [main])
AC_CHECK_LIB([rx], [main])
AC_CHECK_LIB([wwwapp], [main])
AC_CHECK_LIB([wwwcache], [main])
AC_CHECK_LIB([wwwcore], [main])
AC_CHECK_LIB([wwwdir], [main])
AC_CHECK_LIB([wwwfile], [main])
AC_CHECK_LIB([wwwftp], [main])
AC_CHECK_LIB([wwwgopher], [main])
AC_CHECK_LIB([wwwhtml], [main])
AC_CHECK_LIB([wwwhttp], [main])
AC_CHECK_LIB([wwwinit], [main])
AC_CHECK_LIB([wwwmime], [main])
AC_CHECK_LIB([wwwmux], [main])
AC_CHECK_LIB([wwwnews], [main])
AC_CHECK_LIB([wwwstream], [main])
AC_CHECK_LIB([wwwtelnet], [main])
AC_CHECK_LIB([wwwtrans], [main])
AC_CHECK_LIB([wwwutils], [main])
AC_CHECK_LIB([wwwxml], [main])
AC_CHECK_LIB([xmlparse], [main])
AC_CHECK_LIB([xmltok], [main])

# Checks for header files.

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_HEADER_STDBOOL
AC_TYPE_SIZE_T

# Checks for library functions.
AC_FUNC_MALLOC
AC_HEADER_STDC
AC_FUNC_STAT
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([isascii memset regcomp])

AC_CONFIG_FILES([Makefile
	src/Makefile])

AC_OUTPUT
